package org.liuqm.workhome;

import net.sf.cglib.proxy.Enhancer;


/**
 *
 */
public class CgLibProxyFactory {


    public static  <T>T getProxy(Object o) {


        CgLibProxy  cgLibProxy=new CgLibProxy();
        Enhancer enhancer=new Enhancer();
        enhancer.setCallback(cgLibProxy);
        enhancer.setSuperclass(o.getClass());

        return (T) enhancer.create();
    }
}
